|
|
|
|
|
|
|
FileNameIndicates the full pathname of the file you want to create. |
|
|
|
|
|
|
|
|
OverwriteSpecifies a Boolean parameter (True by default) indicating whether to overwrite an existing export file. If this parameter's value is False, attempting to overwrite an existing file causes an error. |
|
|
|
|
|
|
|
|
ShowDialogDetermines whether the Export dialog box is shown to the users. |
|
|
|
|
|
|
|
|
Range, PageFrom, PageToDetermine which pages in the report are exported. They work exactly like the corresponding parameters in the PrintReport method. |
|
|
|
|
|
|
|
|
Note that in addition to being able to print and export with Visual Basic code, users can do so manually by using the buttons at the top of the print preview screen. |
|
|
|
|
|
|
|
|
You have already seen how to add fields to a Data Report to display static information or values from a database. The Data Report also can include fields whose values are the result of performing a simple function on the data displayed in the report. These fields, known as function fields, are created using the rptFunction control in the Toolbox. |
|
|
|
|
|
|
|
|
The data displayed in a Function control is determined by the setting of two properties: the DataField property, which is the field on which the function will be performed, and the FunctionType property, which may be set to the following values: |
|
|
|
|
|
|
|
|
rptFuncVCntValue count, or the number of rows that have a value |
|
|
|
|
|
|
|
|
rptFuncSDEVStandard deviation |
|
|
|
|
|
|
|
|
rptFuncSERRStandard error |
|
|
|
|
|
|
|
|
The Function control performs one of the listed functions on multiple rows of data from a given column of the recordset and displays the result. For this reason, you must place a Function control in the Report Footer section, because all the report data must be processed before the function control can calculate its value. |
|
|
|
|
|
|
|
|
|
You also can use Function controls in Group Footer sections, thus enabling you to create subtotals periodically throughout the report. For instructions on using Group Headers and Footers with the VB Data Environment Designer, see the Visual Basic Help file.  |
|
|
|
|
|
|
|
|
|
|
To demonstrate the Function control in action, consider a simple table that has only two columns: SalesPerson and Revenue. Figure 29.9 shows a report that uses the Function control to display the overall amount and average sales. |
|
|
|
|
|